<template>
  <div class="atlas_main">
    <div class="atlas_left">
      <NavbarCard v-on:cateid="getCateid" :open="true" />
    </div>
    <div class="atlas_body">
      <div class="map_main">
        <div class="map_left">
          <div class="head_box shadow_box">
            <div class="select" @click="showDialog = true">
              请选择产业 <img src="~@img/public/icon-choose.png" alt="" />
            </div>
            <div class="address clearfix">
              <div class="current">
                当前位置：
                <span class="wholeCountry">全国</span>
              </div>
              <div
                v-for="(item, index) in area"
                :key="index"
                style="margin-top:0"
              >
                <div class="options" v-if="item != ''">
                  <img src="~@img/public/icon-next.png" alt="" />
                  <span>
                    {{ item }}
                    <img
                      @click="closeArea(index, item)"
                      src="~@img/public/icon-close.png"
                      alt=""
                    />
                  </span>
                </div>
              </div>
              <div class="options" v-if="industry">
                <img src="~@img/public/icon-next.png" alt="" />
                <span>
                  {{ industry }}
                  <img
                    @click="closeIndustry"
                    src="~@img/public/icon-close.png"
                    alt=""
                  />
                </span>
              </div>
            </div>
          </div>
          <div class="chart_box_map shadow_box">
            <div class="chart_box" ref="chart_map"></div>
          </div>
        </div>
        <div class="map_right">
          <div class="chart_box_bar shadow_box">
            <div class="chart_box" ref="chart_bar"></div>
          </div>
          <div class="filter">
            <div class="find">
              <img src="~@img/public/icon-record.png" alt="" />
              <span>
                <!-- 已为您找到{{ epTotal }}家相关企业，可按以下条件进行高级搜索 -->
                已为您找到{{ epTotal }}家相关企业，以下为高级筛选
              </span>
            </div>
            <div class="flex-f">
              <p>
                <span>企业名称：</span
                ><el-input
                  v-model="company_name"
                  type="text"
                  placeholder="请输入"
                />
              </p>
            </div>
            <div class="flex-f">
              <p>
                <span>企业类型：</span>
                <el-select v-model="entype" clearable placeholder="请选择">
                  <el-option
                    v-for="item in entype_options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </p>
              <p>
                <span>企业资质：</span>
                <el-select v-model="qualificat" clearable placeholder="请选择">
                  <el-option
                    v-for="item in qualificat_options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </p>
            </div>
            <div class="flex-f">
              <p>
                <span>上市状态：</span>
                <el-select v-model="quoted" clearable placeholder="请选择">
                  <el-option
                    v-for="item in quoted_options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </p>
              <p class="btn-group">
                <strong class="search-btn" @click="search">搜索</strong>
                <strong class="clear-btn" @click="clear">清空</strong>
              </p>
            </div>
          </div>
          <div class="head_box_ep ">
            <el-table
              :data="enterpriseData"
              border
              stripe
              style="width: 100%"
              height="295"
              :header-cell-style="{
                textAlign: 'left',
                fontSize: '18px',
                paddingLeft: '20px',
              }"
              :cell-style="{
                textAlign: 'left',
                paddingLeft: '20px',

                fontSize: '14px',
                fontFamily: 'Microsoft YaHei',
                fontWeight: '400',
                color: '#262626',
              }"
            >
              <el-table-column label="企业名称" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                  <div @click="goEnterprise(scope.row.id)">
                    {{ scope.row.company_name }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="企业热度">
                <template slot-scope="scope">
                  <div
                    v-if="
                      scope.row.hots == 0 ||
                        scope.row.hots == '' ||
                        scope.row.hots == null
                    "
                  >
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;  margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;  margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                  <div v-if="scope.row.hots == 1">
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                  <div v-if="scope.row.hots == 2">
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                  <div v-if="scope.row.hots == 3">
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                  <div v-if="scope.row.hots == 4">
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-pale.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                  <div v-if="scope.row.hots == 5">
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                    <img
                      src="~@img/atlas/icon-fire-red.png"
                      style="width:22px;height:26px;margin-right:10px;   margin-top: 10px;"
                    />
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <div class="pagination">
            <el-pagination
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="perpage"
              layout=" prev, pager, next"
              :total="epTotal"
            >
            </el-pagination>
          </div>
        </div>
      </div>
    </div>

    <div class="dialog_box">
      <el-dialog title="请选择产业" :visible.sync="showDialog">
        <ul class="Industrial-chain">
          <li class="top_chain">
            <div class="chain_head">上游</div>
            <el-collapse accordion>
              <el-collapse-item
                v-for="(item, index) in upstream.subNodeList"
                :key="index"
              >
                <template slot="title">
                  <div
                    @click="getProduct(item.node, item.node)"
                    :class="willIndustry == item.node ? 'title_active' : ''"
                  >
                    {{ item.node }}
                  </div>
                </template>
                <ul>
                  <li
                    v-for="(itemx, indexx) in item.subNodeList"
                    :key="indexx"
                    @click="getProduct(itemx.node, itemx.node)"
                    :class="willIndustry == itemx.node ? 'text_active' : ''"
                  >
                    {{ itemx.node }}
                    <i
                      class="el-icon-arrow-right"
                      v-if="itemx.subNodeList.length > 0"
                      :class="subNodeListShow == itemx.node ? 'isactive' : ''"
                    ></i>
                    <ul
                      v-if="
                        itemx.subNodeList.length > 0 &&
                          subNodeListShow == itemx.node
                      "
                    >
                      <li
                        v-for="(items, indess) in itemx.subNodeList"
                        :key="indess"
                        @click.stop="
                          getProduct(items.node, items.node, itemx.node)
                        "
                        :class="willIndustry == items.node ? 'text_active' : ''"
                      >
                        {{ items.node }}
                      </li>
                    </ul>
                  </li>
                </ul>
              </el-collapse-item>
              <!-- <div
              v-if="
                upstream &&
                  upstream.subNodeList &&
                  upstream.subNodeList.length == 0
              "
            >
              暂无产业
            </div> -->
            </el-collapse>
          </li>
          <li class="center_chain">
            <div class="chain_head">中游</div>
            <el-collapse accordion>
              <el-collapse-item
                v-for="(item, index) in midstream.subNodeList"
                :key="index"
              >
                <template slot="title">
                  <div
                    @click="getProduct(item.node, item.node)"
                    :class="willIndustry == item.node ? 'title_active' : ''"
                  >
                    {{ item.node }}
                    <!-- ({{ item.count }}) -->
                  </div>
                </template>
                <ul>
                  <li
                    v-for="(itemx, indexx) in item.subNodeList"
                    :key="indexx"
                    @click="getProduct(itemx.node, itemx.node)"
                    :class="willIndustry == itemx.node ? 'text_active' : ''"
                  >
                    {{ itemx.node }}
                    <i
                      class="el-icon-arrow-right"
                      v-if="itemx.subNodeList.length > 0"
                      :class="subNodeListShow == itemx.node ? 'isactive' : ''"
                    ></i>
                    <ul
                      v-if="
                        itemx.subNodeList.length > 0 &&
                          subNodeListShow == itemx.node
                      "
                    >
                      <li
                        v-for="(items, indess) in itemx.subNodeList"
                        :key="indess"
                        @click.stop="
                          getProduct(items.node, items.node, itemx.node)
                        "
                        :class="willIndustry == items.node ? 'text_active' : ''"
                      >
                        {{ items.node }}
                      </li>
                    </ul>
                  </li>
                </ul>
              </el-collapse-item>
            </el-collapse>
          </li>
          <li class="bottom_chain">
            <div class="chain_head">下游</div>
            <el-collapse accordion>
              <el-collapse-item
                v-for="(item, index) in downstream.subNodeList"
                :key="index"
              >
                <template slot="title">
                  <div
                    @click="getProduct(item.node, item.node)"
                    :class="willIndustry == item.node ? 'title_active' : ''"
                  >
                    {{ item.node }}
                    <!-- ({{ item.count }}) -->
                  </div>
                </template>
                <ul>
                  <li
                    v-for="(itemx, indexx) in item.subNodeList"
                    :key="indexx"
                    @click="getProduct(itemx.node, itemx.node)"
                    :class="willIndustry == itemx.node ? 'text_active' : ''"
                  >
                    {{ itemx.node }}
                    <i
                      class="el-icon-arrow-right"
                      v-if="itemx.subNodeList.length > 0"
                      :class="subNodeListShow == itemx.node ? 'isactive' : ''"
                    ></i>
                    <ul
                      v-if="
                        itemx.subNodeList.length > 0 &&
                          subNodeListShow == itemx.node
                      "
                    >
                      <li
                        v-for="(items, indess) in itemx.subNodeList"
                        :key="indess"
                        @click.stop="
                          getProduct(items.node, items.node, itemx.node)
                        "
                        :class="willIndustry == items.node ? 'text_active' : ''"
                      >
                        {{ items.node }}
                      </li>
                    </ul>
                  </li>
                </ul>
              </el-collapse-item>
            </el-collapse>
          </li>
        </ul>
        <div slot="footer" class="dialog-footer">
          <el-button @click="showDialog = false">
            取 消
          </el-button>
          <el-button type="primary" @click="selectIndustry">
            确 定
          </el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import {
  condition,
  chainGraph,
  barByTopFive,
  firmList,
  nationalMap,
  attractSdMap,
} from "@api/map";
import selectMap from "../../utils/selectMap";
import china from "../../../public/a_map_json/china.json";
import NavbarCard from "@/components/navbarCard.vue";
export default {
  components: { NavbarCard },
  data() {
    return {
      // 当前行业id 行业级别
      industry_id: 32,
      industry_level: "2",
      // 筛选项
      quoted_options: [],
      qualificat_options: [],
      entype_options: [],
      // 参数
      company_name: "",
      quoted: "",
      qualificat: "",
      entype: "",
      searchOption: {
        company_name: "",
        quoted: "",
        qualificat: "",
        entype: "",
      },

      // 上中下游
      IndustrialChain: {},
      // 上游
      upstream: {},
      // 中游
      midstream: {},
      // 下游
      downstream: {},
      // 上中下游中的下级是否显示
      subNodeListShow: false,
      // 上中下游点击产业
      product: "",
      // 将要选中的行业
      willIndustry: "",

      chartBar: null,
      BarData: [],

      chartMap: null,
      mapData: [],
      scatterData: [],
      // 已读取地图列表
      mapList: [],
      area: [],
      industry: "",
      showDialog: false,

      enterpriseData: [],
      epTotal: 0,
      currentPage: 1,
      perpage: 5,
    };
  },
  mounted() {
    this.initChartMap();
    this.initChartBar();
    // 获取筛选项
    this.getCondition();
    // 获取产业链图
    this.getChainGraph();
    // 获取前五柱状图
    this.getEpTopFive();

    this.getAttractEp();
    this.getAttractMap();

    // 监听窗口变化
    window.addEventListener("resize", this.screenAdapter);
  },

  methods: {
    search() {
      this.searchOption.company_name = this.company_name;
      this.searchOption.quoted = this.quoted;
      this.searchOption.qualificat = this.qualificat;
      this.searchOption.entype = this.entype;
      this.currentPage = 1;
      this.getEpTopFive();
      this.getAttractEp();
      this.getAttractMap();
    },
    clear() {
      this.company_name = "";
      this.quoted = "";
      this.qualificat = "";
      this.entype = "";
      this.searchOption = {
        company_name: "",
        quoted: "",
        qualificat: "",
        entype: "",
      };
      this.currentPage = 1;
      this.getEpTopFive();

      this.getAttractEp();
      this.getAttractMap();
    },
    async getCondition() {
      let res = await condition();
      if (res.code == 0) {
        this.entype_options = res.options.entype;
        this.qualificat_options = res.options.qualificat;
        this.quoted_options = res.options.quoted;
      }
    },
    async getChainGraph() {
      let res = await chainGraph({
        inid: this.industry_id,
        area: [this.area[0] || "", this.area[1] || "", this.area[2] || ""],
      });
      if (res.code && res.code != 0) {
        this.IndustrialChain = [];
        this.upstream = [];
        this.midstream = [];
        this.downstream = [];
      } else {
        this.IndustrialChain = res;
        this.upstream = this.IndustrialChain.nodeList[0];
        this.midstream = this.IndustrialChain.nodeList[1];
        this.downstream = this.IndustrialChain.nodeList[2];
      }
    },
    async getEpTopFive() {
      let res = await barByTopFive({
        inid: this.industry_id, // 行业id
        product: this.industry, // 产业产品选择（ 链图上的产品名)
        area: [this.area[0] || "", this.area[1] || "", this.area[2] || ""], // 省市区【 省市区】
        company_name: this.searchOption.company_name,
        entype: this.searchOption.entype, //企业类型id
        qualificat: this.searchOption.qualificat, // 企业资质id
        quoted: this.searchOption.quoted, //上市板块
        page: this.currentPage, //
        perpage: this.perpage,
      });
      if (res.code && res.code != 0) {
        this.BarData = [];
      } else {
        this.BarData = res;
      }
      this.upDataChartBar();
    },
    async getAttractEp() {
      let res = await firmList({
        inid: this.industry_id, // 行业id
        product: this.industry, // 产业产品选择（ 链图上的产品名)
        area: [this.area[0] || "", this.area[1] || "", this.area[2] || ""], // 省市区【 省市区】
        company_name: this.searchOption.company_name,
        entype: this.searchOption.entype, //企业类型id
        qualificat: this.searchOption.qualificat, // 企业资质id
        quoted: this.searchOption.quoted, //上市板块
        page: this.currentPage, //
        perpage: this.perpage,
      });
      if (res.code && res.code != 0) {
      } else {
        this.enterpriseData = res.df;
        this.epTotal = res.size;
      }
    },
    async getAttractMap() {
      let res = await nationalMap({
        inid: this.industry_id, // 行业id
        product: this.industry, // 产业产品选择（ 链图上的产品名)
        area: [this.area[0] || "", this.area[1] || "", this.area[2] || ""], // 省市区【 省市区】
        company_name: this.searchOption.company_name,
        entype: this.searchOption.entype, //企业类型id
        qualificat: this.searchOption.qualificat, // 企业资质id
        quoted: this.searchOption.quoted, //上市板块
        page: this.currentPage, //
        perpage: this.perpage,
      });
      if (res.code && res.code != 0) {
        this.maxValue = 0;
        this.mapData = [];
        this.upDataChartMap();
      } else {
        let maxValue = 0;
        this.mapData = res.map((item) => {
          if (item.value > maxValue) {
            maxValue = item.value;
          }
          return {
            name: item.name,
            value: item.value,
          };
        });
        this.maxValue = maxValue;
        this.upDataChartMap();
      }
    },

    async getAttractScatter() {
      let res = await attractSdMap({
        inid: this.industry_id, // 行业id
        product: this.industry, // 产业产品选择（ 链图上的产品名)
        area: [this.area[0] || "", this.area[1] || "", this.area[2] || ""], // 省市区【 省市区】
        entype: this.searchOption.entype, //企业类型id
        qualificat: this.searchOption.qualificat, // 企业资质id
        quoted: this.searchOption.quoted, //上市板块
      });
      if (res.code && res.code != 0) {
        this.scatterData = [];
      } else {
        let data = res.map((item) => {
          return {
            id: item.id,
            name: item.name,
            value: [item.jwd.lng, item.jwd.lat, 150],
            itemStyle: {
              show: true,
              color: "#05C3F9",
              shadowBlur: 10,
              shadowColor: "#05C3F9",
            },
          };
        });
        this.scatterData = data;
      }

      this.upDataChartMap();
    },
    // 获取行业id
    getCateid(data) {
      this.product = "";
      this.industry = "";
      this.industry_id = data.id;
      this.industry_level = data.industry_level;
      // 获取上中下游
      this.getChainGraph();
      this.area = [];
      let changeOption = {
        geo: {
          map: "china",
        },
        series: [
          {
            type: "map",
            mapType: "china",
          },
        ],
      };
      this.chartMap.setOption(changeOption);
      this.scatterData = [];
      this.currentPage = 1;
      this.getAttractEp();
      this.getAttractMap();
      this.getEpTopFive();
    },
    // 上中下游 展示
    getProduct(node, name, fname) {
      this.product = node;
      this.willIndustry = name;
      if (fname) {
        if (this.subNodeListShow == name) {
          this.subNodeListShow = false;
        } else {
          this.subNodeListShow = fname;
        }
      } else {
        if (this.subNodeListShow == name) {
          this.subNodeListShow = false;
        } else {
          this.subNodeListShow = name;
        }
      }
    },

    initChartMap() {
      this.chartMap = this.$echarts.init(this.$refs.chart_map);
      this.$echarts.registerMap("china", china);
      const initOption = {
        color: ["#05C3F9"],
        tooltip: {
          trigger: "item",
          position: "bottom",
        },
        visualMap: {
          type: "continuous",
          show: true,
          min: 0,
          max: 10,
          left: "2%",
          top: "bottom",
          calculable: true,
          color: ["#f44336", "#fc9700", "#ffde00", "#ffde00", "#00eaff"],
          inRange: {
            color: ["#f6efa6", "#bf444c"],
          },
        },
        geo: {
          type: "map",
          map: "china",
          label: {
            show: true,
            color: "#333",
          },
          roam: false,
          itemStyle: {
            areaColor: "rgba(246, 239, 166)",
            borderColor: "rgba(44, 173, 255, 0.9)",
          },
          emphasis: {
            itemStyle: {
              areaColor: "rgba(254, 136, 112)",
              borderColor: "rgba(44, 173, 255, 0.9)",
            },
          },
          select: {
            itemStyle: {
              color: "rgba(254, 136, 112)",
            },
            label: {
              show: true,
              color: "#333",
            },
          },
          top: "8%",
          bottom: "2%",
          zoom: 0.8,
          scaleLimit: {
            min: 0.5,
            max: 3,
          },
          regions: [],
        },
        series: [
          {
            type: "map",
            mapType: "china",
            geoIndex: 0,
            scaleLimit: {
              min: 0.5,
              max: 3,
            },
            animation: false,
            layoutCenter: ["50%", "50%"],
            layoutSize: "100%",
          },
          {
            inRange: {
              color: ["#05C3F9"],
            },
            name: "企业",
            type: "effectScatter",
            coordinateSystem: "geo",
            symbolSize: function(val) {
              return val[2] / 10;
            },
            showEffectOn: "render",
            rippleEffect: {
              color: "#05C3F9",

              brushType: "stroke",
            },
            label: {
              show: false,
              formatter: "{b}",
              position: "right",
              color: "#05C3F9",
              fontSize: 14,
            },
            select: {
              itemStyle: {
                areaColor: "#05C3F9",
              },
              label: {
                show: true,
                padding: [4, 10],
                color: "#4077c8",
                borderRadius: [6],
                backgroundColor: "#e7f4ff",
                offset: [30, 40],
                formatter: function(params) {
                  //标签内容
                  return params.name;
                },
              },
            },
            itemStyle: {
              show: true,
              areaColor: "#05C3F9",
              shadowBlur: 10,
              shadowColor: "#05C3F9",
            },
            emphasis: {
              label: {
                show: true,
                position: "top",
                padding: [4, 10],
                color: "#4077c8",
                borderRadius: [6],
                backgroundColor: "#e7f4ff",
                formatter: function(params) {
                  //标签内容
                  return params.name;
                },
              },
              itemStyle: {
                areaColor: "#05C3F9",
                shadowBlur: 10,
                shadowColor: "#05C3F9",
              },
            },
            selectedMode: "single",
            zlevel: 1,

            data: [],
          },
        ],
      };
      this.chartMap.setOption(initOption);
      this.chartMap.on("click", async (item) => {
        if (item.componentSubType == "effectScatter") {
          this.goEnterprise(item.data.id);
          return;
        }
      });
      this.chartMap.on("dblclick", async (item) => {
        if (item.componentSubType == "effectScatter") {
          this.goEnterprise(item.data.id);
          return;
        }
        let citys = [
          "北京市",
          "天津市",
          "重庆市",
          "上海市",
          "海南省",
          "香港特别行政区",
          "澳门特别行政区",
        ];
        if (citys.includes(item.name)) {
          this.area.push(item.name);
          this.area.push(item.name);
        } else if (this.area.length == 3) {
          this.area.pop();
          this.area.push(item.name);
        } else {
          this.area.push(item.name);
        }

        // 判断点击地图    是否存在  已缓存地图列表中  不存在 请求地图信息
        if (this.mapList[item.name] == undefined) {
          let { data, subordinate } = await selectMap(item.name);
          if (subordinate) {
            this.getAttractScatter();
            this.currentPage = 1;
            this.getAttractEp();
            this.getAttractMap();
            this.getEpTopFive();
            // this.$message({ message: "加载散点图", type: "warning" });
            return;
          }

          // 已加载地图列表
          this.mapList.push(item.name);
          // 设置地图更新数据
          this.$echarts.registerMap(item.name, data);
        }
        this.currentPage = 1;

        //
        this.getAttractEp();
        this.getAttractMap();
        this.getEpTopFive();

        // 存在地图直接设置
        let changeOption = {
          geo: {
            map: item.name,
          },
          series: [
            {
              type: "map",
              mapType: item.name,
            },
          ],
        };
        this.chartMap.setOption(changeOption);
      });
      this.screenAdapter();
    },
    upDataChartMap() {
      let upChartData = {
        visualMap: {
          show: true,
          max: this.maxValue == 0 ? 1 : this.maxValue,
        },
        geo: {
          regions: this.mapData,
        },
        tooltip: {
          formatter: function(params) {
            if (params.componentSubType == "effectScatter") {
              return "";
              // params.marker + " " + params.name
            } else {
              let value = params.value === params.value ? params.value : 0;
              let marker =
                params.value === params.value
                  ? params.marker
                  : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#467bc0;"></span>';
              return (
                marker +
                " " +
                params.name +
                " : <span style='font-weight:bold;'>" +
                value +
                "家</span>"
              );
            }
          },
        },
        series: [
          {
            type: "map",
            data: this.mapData,
          },
          {
            data: this.scatterData,
          },
        ],
      };
      this.chartMap.setOption(upChartData);
    },

    initChartBar() {
      this.chartBar = this.$echarts.init(this.$refs.chart_bar);

      let initOption = {
        color: [
          new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: "#EB3B5A" },
            { offset: 1, color: "#FE9C5A" },
          ]),
          new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: "#FA8231" },
            { offset: 1, color: "#FFD14C" },
          ]),
          new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: "#F7B731" },
            { offset: 1, color: "#FFEE96" },
          ]),
          new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: "#395CFE" },
            { offset: 1, color: "#2EC7CF" },
          ]),
        ],
        title: {
          show: true,
          text: "全国企业数量排名前5",
          top: 20,
          left: 30,
          textStyle: {
            color: "#333",
            fontSize: 18,
            fontWeight: "bold",
          },
        },
        grid: {
          top: 80,
          left: "10%",
          bottom: "15%",
          right: "4%",
        },
        tooltip: {
          show: "true",
        },
        xAxis: {
          type: "category",
          axisLabel: {
            show: true,
            color: "#A9B0B9",
            fontSize: 14,
            interval: 0,
            // rotate: 10,
            // textAlign: "center",
            formatter: function(params) {
              if (params.length >= 5) {
                return params.slice(0, 5) + "...";
              } else {
                return params;
              }
            },
          },
          axisLine: {
            lineStyle: {
              color: "#EEF3F8",
              width: 1,
            },
          },
          axisTick: {
            show: false,
          },
        },
        yAxis: {
          type: "value",
          axisLabel: {
            show: true,
            color: "#A9B0B9",
            fontSize: 12,
          },
          // interval: 100, //每次增加几个
          axisLine: {
            show: true,
            lineStyle: {
              color: "#EEF3F8",
              width: 1,
            },
          },
          splitLine: {
            show: true,
            lineStyle: {
              // 使用深浅的间隔色
              color: "#EEF3F8",
              width: 1,
            },
          },
        },
        series: [
          {
            type: "bar",
            barWidth: 20, //柱图宽度
            itemStyle: {
              //柱形图圆角，初始化效果
              barBorderRadius: [10, 10, 0, 0],
            },
          },
        ],
      };
      this.chartBar.on("dblclick", async (item) => {
        let citys = [
          "北京市",
          "天津市",
          "重庆市",
          "上海市",
          "海南省",
          "香港特别行政区",
          "澳门特别行政区",
        ];
        if (citys.includes(item.name)) {
          this.area.push(item.name);
          this.area.push(item.name);
        } else if (this.area.length == 3) {
          this.area.pop();
          this.area.push(item.name);
        } else {
          this.area.push(item.name);
        }
        // 判断点击地图    是否存在  已缓存地图列表中  不存在 请求地图信息
        if (this.mapList[item.name] == undefined) {
          let { data, subordinate } = await selectMap(item.name);
          if (subordinate) {
            this.getAttractScatter();
            this.currentPage = 1;
            this.getAttractEp();
            this.getAttractMap();
            this.getEpTopFive();
            // this.$message({ message: "加载散点图", type: "warning" });
            return;
          }
          // 已加载地图列表
          this.mapList.push(item.name);
          // 设置地图更新数据
          this.$echarts.registerMap(item.name, data);
        }
        this.currentPage = 1;
        //
        this.getAttractEp();
        this.getAttractMap();
        this.getEpTopFive();

        // 存在地图直接设置#389BB7
        let changeOption = {
          geo: {
            map: item.name,
          },
          series: [
            {
              type: "map",
              mapType: item.name,
            },
          ],
        };
        this.chartMap.setOption(changeOption);
      });
      this.chartBar.setOption(initOption);
    },
    upDataChartBar() {
      let BarData = this.BarData;
      let color = [
        new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: "#FD4467" },
          { offset: 1, color: "#FF6991" },
        ]),
        new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: "#FF7C78" },
          { offset: 1, color: "#FD9965" },
        ]),
        new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: "#18C5B9" },
          { offset: 1, color: "#19D0B2" },
        ]),
        new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: "#4DA1FF" },
          { offset: 1, color: "#4DA1FF" },
        ]),
        new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: "#4DA1FF" },
          { offset: 1, color: "#4DA1FF" },
        ]),
      ];
      let nameData = BarData.map((item) => {
        return item.name;
      });
      let valueData = BarData.map((item, index) => {
        return {
          value: item.value,
          itemStyle: {
            color: color[index],
          },
        };
      });

      let initOption = {
        title: {
          text: "全国企业数量排名前5",
        },
        xAxis: {
          data: nameData,
        },
        series: [
          {
            data: valueData,
          },
        ],
      };
      this.chartBar.setOption(initOption);
    },

    // 关闭地图
    closeArea(index, name) {
      if (index == 0) {
        this.area = [];
        let changeOption = {
          geo: {
            map: "china",
          },
          series: [
            {
              type: "map",
              mapType: "china",
            },
          ],
        };
        this.chartMap.setOption(changeOption);
      } else if (index == 1) {
        let citys = [
          "北京市",
          "天津市",
          "重庆市",
          "上海市",
          "海南省",
          "香港特别行政区",
          "澳门特别行政区",
        ];
        let changeOption = {};
        if (citys.includes(name)) {
          this.area = [];
          changeOption = {
            geo: {
              map: "china",
            },
            series: [
              {
                type: "map",
                mapType: "china",
              },
            ],
          };
        } else {
          this.area = [this.area[0]];
          changeOption = {
            geo: {
              map: this.area[0],
            },
            series: [
              {
                type: "map",
                mapType: this.area[0],
              },
            ],
          };
        }

        this.chartMap.setOption(changeOption);
      } else if (index == 2) {
        this.area = [this.area[0], this.area[1]];
      }
      this.currentPage = 1;
      this.scatterData = [];

      //
      this.getAttractEp();
      this.getAttractMap();
      this.getEpTopFive();
    },
    // 清空产业
    closeIndustry() {
      this.industry = "";
      if (this.area.length == 3) {
        this.getAttractScatter();
      }
      this.currentPage = 1;
      this.getAttractEp();
      this.getAttractMap();
      this.getEpTopFive();
    },
    selectIndustry() {
      this.industry = this.willIndustry;
      this.showDialog = false;
      if (this.area.length == 3) {
        this.getAttractScatter();
      }
      this.currentPage = 1;
      this.getAttractEp();
      this.getAttractMap();
      this.getEpTopFive();
    },

    goEnterprise(id) {
      this.$router.push({
        name: "enterprise",
        params: { id, activeMenu: "map", type: "qg" },
      });
    },
    handleCurrentChange(val) {
      this.currentPage = val;
      this.getAttractEp();
    },
    // 更新数据--地图--晋城地图
    screenAdapter() {
      window.innerHeight == 1080 ? (this.isFull = true) : (this.isFull = false);
      if (this.chartMap != null) {
        if (window.innerWidth <= 1800 && window.innerWidth >= 1440) {
          let options = {
            geo: {
              zoom: 0.8,
            },
          };
          this.chartMap.setOption(options);
        } else if (window.innerWidth < 1440) {
          this.chartMap.setOption({
            geo: {
              zoom: 0.7,
            },
          });
        }
      }
      if (this.chartBar != null) {
        this.$nextTick(() => {
          this.chartBar.resize();
        });
      }
    },
  },
};
</script>

<style lang="less" scoped>
.home {
  color: #333;
}
.atlas_main {
  width: 100%;
  height: 100%;
  display: flex;
  background: #f0f0f0;
  .atlas_left {
    flex: 0 0 360px;
  }
  .atlas_body {
    flex: 1;
    padding: 0 0 0 30px;
    overflow: hidden;
    .map_main {
      box-sizing: border-box;
      width: 100%;
      height: 100%;
      background: #fafafa;
      padding: 30px;
      display: flex;
      justify-content: space-between;
      .map_left {
        flex: 0 0 67.35%;
        height: 100%;
      }
      .map_right {
        position: relative;
        flex: 1;
        margin-left: 20px;
        height: 100%;
      }
    }
  }
}
/deep/ .el-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 780px;
  height: 300px;
  margin-left: -390px;
  margin-top: -150px !important;
  background: #ffffff;
  box-shadow: 0px 5px 50px 0px rgba(186, 186, 186, 0.5);
  border-radius: 20px;
}
/deep/ .el-dialog__header {
  width: 604px;
  margin: 0 auto;
  padding: 0;
  height: 80px;
  line-height: 80px;
  text-align: center;
  border-bottom: 1px dashed #dddddd;
}
/deep/ .el-dialog__title {
  font-size: 30px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #0143b3;
}
/deep/ .el-dialog__body {
  text-align: center;
  height: calc(100% - 160px);
}
/deep/ .el-dialog__body {
  span {
    display: inline-block;
    width: 120px;
    font-size: 18px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #333333;
  }
  span.tips {
    margin: 20px 0;
    width: 100%;
    font-size: 24px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #333333;
  }
  text-align: center;
}
/deep/ .el-dialog__footer {
  padding: 0;
  text-align: center;
}
/deep/.el-dialog .el-button--default {
  width: 247px;
  height: 48px;
  line-height: 0.8;
  border: 2px solid #0043b3;
  border-radius: 10px;
  font-size: 26px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #0043b3;
}
/deep/.el-dialog .el-button--primary {
  width: 247px;
  height: 48px;
  line-height: 0.8;
  background: linear-gradient(90deg, #1a6dc1, #0043b3);
  box-shadow: 0px 5px 15px 0px rgba(1, 73, 130, 0.5);
  border-radius: 10px;
  font-size: 26px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #fff;
}

/deep/.el-dialog .el-input__inner {
  height: 50px;
  line-height: 50px;
  background: #f7f7f7;
  border-radius: 8px;
  border: 0;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333;
  line-height: 33px;
}
/deep/.el-dialog .el-input__inner:focus {
  background: #f7f7f7;
}

/deep/.el-dialog .el-input__inner:hover {
  border-color: transparent;
}

.Industrial-chain {
  display: flex;
  height: 95%;
  width: 726px;
  margin: 0 auto;
  justify-content: space-between;
  align-self: center;
  & > li {
    // width: 480px;
    flex: 1;
    overflow: hidden;
    cursor: default;
    li {
      font-weight: bold;
      cursor: default;
      li {
        font-weight: 400;
      }
    }
  }

  .chain_head {
    // height: 48px;
    // line-height: 48px;
    width: 230px;
    height: 60px;
    line-height: 60px;
    font-size: 24px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
    border-radius: 6px;
    text-align: center;
  }
  .top_chain {
    margin: 0 18px 0 0;
    .chain_head {
      background: linear-gradient(0deg, #747bfe 0%, #468ae4 100%);
      box-shadow: 0px 2px 5px 0px rgba(32, 46, 127, 0.5);
    }

    /deep/ .el-collapse {
      height: calc(100% - 70px);
      margin-top: 10px;
      background: rgba(120, 163, 255, 0.15);
      border-radius: 6px;
      overflow-y: scroll;
      scrollbar-color: #767ffe #ebf1ff; //滚动条轨道颜色   滚动条滑块的颜色
      scrollbar-width: 6px;
      scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失

      &::-webkit-scrollbar {
        /*滚动条整体样式*/
        width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
        height: 70px;
      }
      &::-webkit-scrollbar-thumb {
        /*滚动条里面小方块*/
        border-radius: 6px;
        background: linear-gradient(0deg, #747bfe, #468ae4);
      }
      &::-webkit-scrollbar-track {
        /*滚动条里面轨道*/
        background: #ebf1ff;
        border-radius: 6px;
      }
    }
  }
  .center_chain {
    margin: 0 18px 0 0;

    .chain_head {
      background: linear-gradient(0deg, #ff7372 0%, #fba361 100%);
      box-shadow: 0px 2px 5px 0px rgba(148, 31, 28, 0.5);
    }
    /deep/ .el-collapse {
      height: calc(100% - 70px);
      margin-top: 10px;
      background: rgba(255, 114, 114, 0.15);
      border-radius: 6px;
      // overflow-y: auto;
      overflow-y: scroll;
      scrollbar-color: #ff7c78 #ffeaea; //滚动条轨道颜色   滚动条滑块的颜色
      scrollbar-width: 6px;
      scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失

      &::-webkit-scrollbar {
        /*滚动条整体样式*/
        width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
        height: 70px;
      }
      &::-webkit-scrollbar-thumb {
        /*滚动条里面小方块*/
        border-radius: 6px;
        background: linear-gradient(0deg, #ff7c78, #fd9965);
      }
      &::-webkit-scrollbar-track {
        /*滚动条里面轨道*/
        background: #ffeaea;
        border-radius: 6px;
      }
    }
  }
  .bottom_chain {
    margin: 0 0 0 0;
    .chain_head {
      background: linear-gradient(0deg, #12adae 0%, #17d0b1 100%);
      box-shadow: 0px 2px 5px 0px rgba(9, 120, 121, 0.5);
    }
    /deep/ .el-collapse {
      margin-top: 10px;
      height: calc(100% - 70px);
      background: rgba(23, 208, 177, 0.15);
      border-radius: 6px;
      overflow-y: scroll;
      scrollbar-color: #1ed0c4 #dcf8f3; //滚动条轨道颜色   滚动条滑块的颜色
      scrollbar-width: 6px;
      scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失

      &::-webkit-scrollbar {
        /*滚动条整体样式*/
        width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
        height: 70px;
      }
      &::-webkit-scrollbar-thumb {
        /*滚动条里面小方块*/
        border-radius: 6px;
        background: linear-gradient(0deg, #1ed0c4, #19d0b2);
      }
      &::-webkit-scrollbar-track {
        /*滚动条里面轨道*/
        background: #dcf8f3;
        border-radius: 6px;
      }
    }
  }
}
.shadow_box {
  background: #ffffff;
  box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
  border-radius: 10px;
  margin-bottom: 20px;
}
.head_box {
  height: 90px;
}
.head_box_right {
  height: 90px;
  line-height: 90px;
  cursor: default;
  img {
    margin-left: 30px;
    margin-right: 10px;
  }

  span {
    float: right;
    font-size: 24px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #999999;
    margin: 0 40px 0 10px;
  }
  strong {
    float: right;
    font-size: 42px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #0043b3;
  }
}
.chart_box_bar {
  height: 220px;
}
.chart_box_map {
  height: calc(100% - 110px);
}
.chart_box {
  width: 100%;
  height: 100%;
}
.head_box {
  display: flex;
  .select {
    float: left;
    margin: 25px 20px 25px 30px;
    width: 160px;
    height: 40px;
    line-height: 40px;
    background: #446db3;
    box-shadow: 0px 2px 5px 0px rgba(25, 75, 183, 0.5);
    opacity: 0.99;
    text-align: center;
    border-radius: 10px;
    font-size: 18px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    img {
      margin-top: -2px;
      vertical-align: middle;
    }
  }
  .address {
    // float: left;
    div {
      display: inline-block;
      margin-top: 32px;
      height: 28px;
      line-height: 26px;
      cursor: pointer;
      img {
        margin: 0 8px;
      }
    }
    .options {
      span {
        display: inline-block;
        box-sizing: border-box;
        padding: 0 10px;
        height: 28px;
        background: #ffffff;
        border: 1px solid #5889dc;
        border-radius: 14px;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #5889dc;
        span {
          vertical-align: middle;
        }
        cursor: default;
        img {
          margin: -3px 2px 0 2px;
          cursor: default;
          vertical-align: middle;
          width: 11px;
          height: 11px;
        }
      }
    }
    .current {
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #666666;
      cursor: default;
    }
    .wholeCountry {
      color: #333;
    }
  }
}

// 产业链样式修改
/deep/.top .el-collapse {
  border-top: 0;
  border-bottom: 0;
  height: 252px;
  overflow-y: scroll;
  scrollbar-color: #767ffe #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
  scrollbar-width: 6px;
  scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
  &::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 70px;
  }
  &::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 6px;
    background: linear-gradient(0deg, #767ffe, #79aefe);
  }
  &::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    background: #e9f3ff;
    border-radius: 6px;
  }
}
/deep/.center .el-collapse {
  border-top: 0;
  border-bottom: 0;
  height: 252px;
  overflow-y: scroll;
  scrollbar-color: #ff7c78 #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
  scrollbar-width: 6px;
  scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
  &::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 70px;
  }
  &::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 6px;
    background: linear-gradient(0deg, #ff7c78, #fd9965);
  }
  &::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    background: #e9f3ff;
    border-radius: 6px;
  }
}
/deep/.bottom .el-collapse {
  border-top: 0;
  border-bottom: 0;
  height: 252px;
  overflow-y: scroll;
  scrollbar-color: #1ed0c4 #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
  scrollbar-width: 6px;
  scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
  &::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 70px;
  }
  &::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 6px;
    background: linear-gradient(0deg, #1ed0c4, #19d0b2);
  }
  &::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    background: #e9f3ff;
    border-radius: 6px;
  }
}
/deep/.el-collapse-item__header {
  position: relative;
  margin-top: 20px;
  height: 30px;
  font-size: 18px;
  line-height: 30px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #333333;
  text-align: center !important;
  border: none;
  div {
    width: 100%;
  }
}

/deep/.el-collapse-item__content {
  padding-bottom: 0;
  text-align: center;
  li {
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #666666;
    line-height: 30px;
  }
}
/deep/.el-collapse-item__wrap {
  border: none;
}
/deep/.el-collapse-item__arrow {
  position: absolute;
  right: 10px;
}
.isactive {
  transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
  -o-transform: rotate(90deg);
}
.el-collapse-item__header div.title_active {
  color: #0043b3;
}
.el-collapse-item__content li.text_active {
  color: #0043b3;
  font-weight: bold;
  li {
    color: #666;
    font-weight: 400;
  }
}

// 表格分页样式修改
.el-pagination {
  position: absolute;
  right: 0;
  bottom: 0;
  text-align: center;
}
/deep/ .el-pager li {
  min-width: 28px;
  // width: 30px;
  height: 30px;
  line-height: 30px;
  font-size: 14px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #666666;
  background: #fafafa;
  box-shadow: 0px 0px 4px 0px rgba(86, 86, 86, 0.11);
  border-radius: 6px;
  margin: 0 3px;
}

/deep/ .el-pager li.active {
  color: #fff;
  background: #5889dc;
  box-shadow: 0px 0px 3px 0px rgba(0, 50, 89, 0.4);
  border-radius: 6px;
}

/deep/ .el-pagination .el-icon-arrow-right:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-right.png") no-repeat center;
}
/deep/
  .el-pagination
  button:disabled.btn-next:hover
  .el-icon-arrow-right:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-right.png") no-repeat center;
}
/deep/.el-pagination .btn-next:hover .el-icon-arrow-right:before {
  background: url("~@img/atlas/sidenav-hover2.png") no-repeat center;
}
/deep/ .el-pagination .el-icon-arrow-left:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;

  background: url("~@img/atlas/icon-page-left.png") no-repeat center;
}
/deep/
  .el-pagination
  button:disabled.btn-prev:hover
  .el-icon-arrow-left:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: url("~@img/atlas/icon-page-left.png") no-repeat center;
}
/deep/.el-pagination .btn-prev:hover .el-icon-arrow-left:before {
  background: url("~@img/atlas/sidenav-hover1.png") no-repeat center;
}
/deep/ .dialog_box .el-dialog {
  width: 1000px;
  height: 720px;
  margin-left: -500px !important;
  margin-top: -320px !important;
}
.filter {
  margin-top: -10px;
  margin-bottom: 10px;
  .find {
    margin-bottom: 20px;
    font-size: 18px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #333333;
    text-align: left;
    img,
    span {
      vertical-align: middle;
    }
  }
  div.flex-f {
    display: flex;
    justify-content: space-between;
    p {
      display: flex;
      line-height: 32px;
      margin-bottom: 10px;
    }

    /deep/ .el-select .el-input {
      width: 150px;
      height: 32px;
      line-height: 32px;
    }
    /deep/ .el-input__inner {
      height: 32px;
      line-height: 32px;
    }
    /deep/ .el-input {
      width: 389px;
      height: 32px;
      line-height: 32px;
    }
    .btn-group {
      strong {
        width: 110px;
        height: 32px;
        line-height: 30px;
        border-radius: 4px;
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
      }
      .search-btn {
        background: #446db3;
        border: 1px solid #446db3;
        color: #ffffff;
        margin-right: 10px;
        cursor: default;
      }
      .clear-btn {
        background: #ffffff;
        border: 1px solid #446db3;
        color: #446db3;
        cursor: default;
      }
    }

    span {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
    }
  }
}

/deep/ .el-collapse-item__header,
/deep/ .el-collapse-item__wrap {
  background: transparent;
}

//// 表格样式修改
/deep/.el-table--striped
  .el-table__body
  tr.el-table__row--striped
  td.el-table__cell {
  background: #f7faff;
}

/deep/.el-table__header .has-gutter tr th {
  height: 48px;
  background: #446db3;
  color: #fff;
  border-right: 0;
}
/deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
  background: #f7faff;
}
/deep/ .el-table td {
  padding: 0;
}
/deep/ .el-table td div {
  height: 48px;
  line-height: 48px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  img {
    margin-top: 8px;
  }
}
/deep/.el-table tr {
  height: 48px;
  font-size: 14px;
  background-color: #fff;
}
/deep/.el-table .el-table__cell {
  height: 48px;
  padding: 0;

  .cell {
    height: 48px;
    line-height: 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/deep/ .el-pagination .btn-next,
/deep/ .el-pagination .btn-prev {
  padding: 0;
  background-size: 14px;
}
/*
  *常用电脑尺寸  1680 * 900
  *              1536 * 864
  *              1440 * 900
  *ipad pro      1366 * 1024
  *ipad mini     1024 * 768
  *ipad          1024 * 768
 */
/*分辨率低于1680，采用下面的样式*/
@media screen and (max-device-width: 1680px) {
  .atlas_main .atlas_body .map_main .map_left {
    flex: 0 0 61%;
    height: 100%;
  }
  /deep/ .el-table {
    max-width: 472px;
    height: 246px !important;
  }
}
/*分辨率低于1536，采用下面的样式*/
@media screen and (max-device-width: 1536px) {
  .atlas_main .atlas_body .map_main .map_left {
    flex: 0 0 55%;
    height: 100%;
  }
  /deep/ .el-table {
    max-width: 472px;
    height: 196px !important;
  }
  .filter div.flex-f span {
    font-size: 13px;
  }
  .filter .find {
    margin-bottom: 10px;
    font-size: 16px;
  }
  .filter div.flex-f p {
    margin-bottom: 6px;
  }
  .chart_box_bar {
    height: 200px;
  }
  .select img {
    margin-top: 0px;

    height: 10px;
  }
  .select {
    margin: 25px 10px 25px 10px;
    width: 110px;
    font-size: 14px;
  }
  .address .current {
    font-size: 12px;
  }
  .head_box {
    display: flex;
  }
  .address div img {
    margin: -2px 8px;
  }
  .address .options span {
    padding: 0 4px;
    font-size: 12px;
  }
  .address .options span img {
    margin: -2px 2px 0 2px;
    width: 9px;
    height: 9px;
  }
  .address {
    overflow-x: auto;
    white-space: nowrap;
    width: 360px;
    text-align: left;
    scrollbar-color: #767ffe #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
    scrollbar-width: 4px;
    scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
    &::-webkit-scrollbar {
      /*滚动条整体样式*/
      width: 4px; /*高宽分别对应横竖滚动条的尺寸*/
      height: 4px;
    }
    &::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      border-radius: 4px;
      background: linear-gradient(0deg, #767ffe, #79aefe);
    }
    &::-webkit-scrollbar-track {
      /*滚动条里面轨道*/
      background: #e9f3ff;
      border-radius: 4px;
    }
  }
}
/*分辨率低于1440，采用下面的样式*/
@media screen and (max-device-width: 1440px) {
  /deep/ .el-table {
    max-width: 472px;
    height: 248px !important;
  }
  .filter div.flex-f /deep/ .el-input {
    width: 360px;
  }
  .filter div.flex-f /deep/ .el-select .el-input {
    width: 130px;
  }
  .select {
    float: left;
    margin: 25px 10px 25px 10px;
    width: 100px;
    font-size: 14px;
  }
}
/*分辨率低于1366，采用下面的样式*/
@media screen and (max-device-width: 1366px) {
  .filter div.flex-f .btn-group strong {
    width: 90px;
  }
  .filter div.flex-f /deep/ .el-input {
    width: 320px;
  }
  .filter div.flex-f /deep/ .el-select .el-input {
    width: 100px;
  }

  /deep/ .el-table {
    max-width: 390px;
    height: 296px !important;
  }
}
/*分辨率低于1180，采用下面的样式*/
@media screen and (max-device-width: 1180px) {
  .atlas_main .atlas_body .map_main {
    flex-direction: column;
    overflow-y: auto;
  }
  .chart_box_map {
    height: 480px;
  }
  .atlas_main .atlas_body .map_main .map_right[data-v-41f10c7f] {
    margin-left: 0px;
  }
  /deep/ .el-table {
    max-width: 730px;
    height: 296px !important;
  }
  .filter div.flex-f /deep/ .el-input {
    width: 660px;
  }
  .filter div.flex-f /deep/ .el-select .el-input {
    width: 280px;
  }
  .filter div.flex-f .btn-group strong {
    width: 170px;
  }

  .el-pagination[data-v-41f10c7f] {
    margin: 20px;
    position: relative;
    transform: scale(1.2);
    -moz-transform: scale(1.2);
    -webkit-transform: scale(1.2);
    -o-transform: scale(1.2);
    padding-bottom: 20px;
  }
}
/*分辨率低于1024，采用下面的样式*/
@media screen and (max-device-width: 1024px) {
  .filter div.flex-f /deep/ .el-input {
    width: 500px;
  }
  .filter div.flex-f /deep/ .el-select .el-input {
    width: 200px;
  }
  .filter div.flex-f .btn-group strong {
    width: 130px;
  }
}
/deep/ .el-table .el-table__body-wrapper .el-table__cell .cell,
/deep/ .el-table .el-table__fixed-body-wrapper .el-table__cell .cell {
  cursor: default !important;
}
</style>
